package com.delu.controller;

import com.delu.data.Result;
import com.delu.em.ResultEnum;
import com.delu.entity.Province;
import com.delu.mapper.ProvinceSiteMapper;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.awt.*;
import java.util.List;

@RestController
@RequestMapping("province")
@Api("网点管理")
public class ProvinceController {
    @Resource
    private ProvinceSiteMapper provinceSiteMapper;

    @GetMapping
    @ApiOperation("省网点信息")
    @ApiImplicitParam(name = "id",value = "省网点ID",required = true,paramType = "query")
    public Result selectProvince(@RequestParam("id")Integer id){
        System.out.println("省网点信息" + id);
        List<Province> provinceList = provinceSiteMapper.selectProvince(id);
        return Result.response(ResultEnum.SUCCESS).setData(provinceList);
    }
}
